<?php slot('questionaire_footer_tabs') ?>
<table style="width:100%;bottom:0;position:absolute;">
    <tr>
        <td width="50%" class="tab tab" height="40" align="center" > <a id="<?php echo $id ?>" class="change_status" href="1"><?php echo __('Activate') ?></a></td>
        <td width="50%" class="tab tab" height="40" align="center" > <a id="<?php echo $id ?>" class="change_status" href="0"><?php echo __('Deactivate') ?></a></td>
    </tr>
</table>

<script type="text/javascript">
    $('.change_status').click(function() {
        var status = $(this).attr('href');
        $.get('<?php echo url_for('@admin_page?module=questionaire&action=changeStatus&id=') ?>' + $(this).attr('id') + '&status=' + status, function(data) {
            if (status == 0) {
                alert('<?php echo __('Questionaire deactivated') ?>');
                window.location.href = window.location.href;
            } else {
                alert('<?php echo __('Questionaire activated') ?>');
                window.location.href = window.location.href;
            }
        });
                
        return false;
    });
</script>

<?php end_slot() ?>